﻿using ProjectManageSystemApi.Enums;
using ProjectManageSystemApi.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ProjectManageSystemApi.Services
{
    public interface IUserServices
    {
        TokenResponse GetToken(string account);
        TokenResponse RefreshToken(string oldToken);
        bool Insert(UserInfoDto userInfo);
        bool Update(UserInfoDto userInfo);
        UserInfoDto GetUserByUserId(long userId);
        PageVo<IEnumerable<UserInfoDto>> GetAll(PageBo<UserParam> pageBo);
        bool PasswordSame(string userName, string password);
        bool EnableByUserName(string userName);
        bool ExistByUserName(string userName);
        bool ExistByUserId(long id);
        bool GetUserIdByToken(string token, out long userId);
        IEnumerable<UserRoleDto> GetAllUser();
        bool UpdateUserStatus(long id, UserInfoStatus status);
        bool AllowedLoginType(string userName, LoginType type);
    }
}
